﻿// DPRegImmRegOperand2.cs
// Contains a class for anoprerand 2 for a data processing instruction

using System;


namespace armsim
{

    /// <summary>
    /// THe base class for all of the Data Processing Operand2 values
    /// </summary>
    public abstract class DPOperand2
    {
        /// <summary>
        /// Initializes a new DPOperand 2 instance
        /// </summary>
        /// <param name="instruction"></param>
        protected DPOperand2(uint instruction){ }

        /// <summary>
        /// Computes the value to be used by the dp instruction
        /// </summary>
        /// <param name="cpu">the VirtualCPU to retrieve values from</param>
        /// <returns></returns>
        public abstract uint ComputeValue(VirtualCPU cpu);

        /// <summary>
        /// Converts the operand back into assembly language
        /// </summary>
        /// <param name="cpu">the VirtualCPU to retrieve values from</param>
        /// <returns>A string containing the assembly</returns>
        public abstract String ToAssembly(VirtualCPU cpu);

    }
}
